<template>
    <div>
            <div class="mui-numbox" data-numbox-min='1' data-numbox-max='60'>
					<button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
					    <input id="test" class="mui-input-numbox" type="number" :value="num" @change = "getNumber" ref="number"/>
					<button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
			</div>
    </div>
</template>

<script>
import mui from '../../lib/Mui/js/mui.min.js'
    export default {
        mounted :function (){
            mui('.mui-numbox').numbox()
        },
        data:function(){
            return {
                id: 1
            }
        },
        methods:{
            getNumber(){
                var newDate = {id:this.id,count:this.$refs.number.value};
                this.$store.commit('updateNum',newDate)
                
                
                
            }
        },
        props:['num']
    }
</script>

<style lang="scss">
    .mui-numbox {
        height: 30px ;
        width: 100px;
    }
    .mui-numbox [class*=numbox-btn], .mui-numbox [class*=btn-numbox] {
        width:30px;
    }
    .mui-numbox {
        padding: 0px 30px 0 30px;
    }
    
</style>